ArcGIS API for Windows Phone - Library Reference
LengthsAsync(IList<Graphic>,Nullable<LinearUnit>,Boolean,Object) Method
See Also  Send comments on this topic
ESRI.ArcGIS.Client.Tasks Namespace > GeometryService Class > LengthsAsync Method : LengthsAsync(IList<Graphic>,Nullable<LinearUnit>,Boolean,Object) Method

graphics
The graphics used to calculate lengths.
lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the Spatial Reference of the geometry.
geodesic
If polylines are in geographic coordinate system, then geodesic needs to be set to true in order to calculate the ellipsoidal shortest path distance between each pair of the vertices in the polylines. The output if lengthUnit is not specified is returned in meters.
userToken
A user-defined object that is passed to the method invoked.
Calculates the lengths of each specified polyline. Raises the LengthsCompleted event on success, or the TaskBase.Failed event on failure.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub LengthsAsync( _
   ByVal graphics As IList(Of Graphic), _
   ByVal lengthUnit As Nullable(Of LinearUnit), _
   ByVal geodesic As Boolean, _
   ByVal userToken As Object _
) 
C# 
public void LengthsAsync( 
   IList<Graphic> graphics,
   Nullable<LinearUnit> lengthUnit,
   bool geodesic,
   object userToken
)

Parameters

graphics
The graphics used to calculate lengths.
lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the Spatial Reference of the geometry.
geodesic
If polylines are in geographic coordinate system, then geodesic needs to be set to true in order to calculate the ellipsoidal shortest path distance between each pair of the vertices in the polylines. The output if lengthUnit is not specified is returned in meters.
userToken
A user-defined object that is passed to the method invoked.

Requirements

Target Platforms:Windows Phone 7

See Also

© ESRI, Inc. All Rights Reserved.